import java.util.Date;
import static java.lang.Math.*;
import com.bit.demo1.Computer;
public class Dog {
    private int age;
    private  String name;
    private  String color;
    public Dog(){
        this(10,"hou","huang");
        this.name="侯震元";
        this.age=128;
        this.color="黄";
    }
    public Dog(int age,String name,String color){
        this.age=age;
        this.name=name;
        this.color=color;
    }
    public void eat(){
        System.out.println(this.name+"吃狗粮");
    }
    public void sleep(){
        System.out.println(this.name+"在睡觉");
    }
    public void show(){
        System.out.println("姓名:"+this.name +" 年龄:"+this.age+" 毛色:"+this.color);
    }
    public static void main(String[] args){
        Dog dog=new Dog();
        Dog dog1=new Dog(10,"zhangsan","green");
        System.out.println(dog.age);
        System.out.println(dog.name);
        dog.show();
        Date date=new Date();
        java.util.Date date1=new java.util.Date();  //这种方式不推荐。
        System.out.println(date.getTime());
        System.out.println();
    }
}
